import request from "@/utils/request";
import request2 from "@/utils/request2";

export function login(data) {
  return request({
    url: "api/v1/backend/user/oauth/token",
    method: "post",
    data
  });
}

// export function getInfo(token) {
//   return request2({
//     url: "/api/v1/ajax_public_user_info",
//     method: "post",
//     token
//   });
// }

// export function getLeftMenus() {
//   return request({
//     url: "api/v1/backend/menu/left",
//     method: "post"
//   });
// }

export function logout() {
  return request({
    url: "/user/logout",
    method: "post"
  });
}
